//
// Created by DELL on 2023/11/27.
//


#ifndef BSP_CAN_H
#define BSP_CAN_H

#include "main.h"
#include "can.h"
#include "BSPconfig.h"
#include "driver_motor.h"

//用一个联合体接收了pitch，error，status这一系列的参数
typedef union Chassis_SendData
{
    struct
    {
        int16_t angle;      // 0.01/LSB
        uint8_t errorStatus;
        uint8_t heroStatus;
        uint8_t Vision_Success;
    } chassisData;
    char data[8];
}GimbalStatusSturct;

//extern PitchAngle pitchAngle;
extern GimbalStatusSturct gimbalStatus;
extern uint8_t Unlimit_Flag;
void bsp_can_init(void );



#endif //BSP_CAN_H
